<template>
  <div>
    <div class="box">
      <el-row>
        <el-col>
          <el-menu
            mode="vertical"
            :collapse="msg"
            default-active="/about/hom"
            class="el-menu-vertical-demo"
            @open="handleOpen"
            @close="handleClose"
            background-color="#545c64"
            text-color="white"
            active-text-color="#ffd04b"
            router
          >
            <el-submenu index="/about">
              <template slot="title">
                <i class="el-icon-location"></i>
                <span>
                  <!-- 二级首页 -->
                  <!-- 首页 -->
                  <router-link to="/about/hom">二级首页</router-link>
                </span>
              </template>
            </el-submenu>
            <el-menu-item index="/about/user">
              <i class="el-icon-menu"></i>
              <span slot="title">
                用户
                <!-- <router-link to="/about/user">用户</router-link> -->
              </span>
            </el-menu-item>
            <el-menu-item index="/about/txt">
              <i class="el-icon-document"></i>
              <span slot="title">
                文章
                <!-- <router-link to="/about/txt">文章</router-link> -->
              </span>
            </el-menu-item>
            <el-menu-item index="/about/set">
              <i class="el-icon-setting"></i>
              <span slot="title">
                设置
                <!-- <router-link to="">设置</router-link> -->
              </span>
            </el-menu-item>
            <el-menu-item index="/about/eachat">
              <!-- 跳转的一种方法   外层使用router 属性-->
              <i class="el-icon-share"></i>
              <span slot="title">
                图表
                <!-- <router-link to="">图表</router-link> -->
              </span>
            </el-menu-item>
          </el-menu>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  name: "VscodeInsidersNav",

  data() {
    return {};
  },
  props: ["msg"],
  mounted() {
    this.zedei();
  },

  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
    zedei() {
      console.log(this.msg);
    },
  },
};
</script>

<style  scoped>
* {
  margin: 0;
}
ul {
  height: 100vh;
  margin-right: 10px;
}
li {
  height: 80px;
}
.box {
  height: 100%;
  width: 100%;
  /* background-color: red; */
}
.box a {
  display: inline-block;
  width: 100%;
  color: white;
  height: 100%;
  text-decoration: none;
  font-size: 20px;
}
.el-menu-item {
  width: 100%;
}
[class*="el-col-"] {
  width: 100%;
  height: 100%;
}

/* element.style {
  position: absolute;
  left: 0px;
  top: 0px;
  width: 100px;
  height: 300px;
  user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  padding: 0px;
  margin: 0px;
  border-width: 0px;
} */
</style>